<div class="content"> <!-- Inicio da DIV content -->


    <?php $this->load->view("giah/snippets/servidor-detalhe"); ?>
    <div id="accordion">
        <h3><a href="#">Cadastro</a></h3>
        <div><!-- Início do formulário pensionistas -->
            <form name="form_pensionista" id="form_pensionista" action="<?php echo base_url() ?>giah/pensionista/atualizar" method="post">
                <input type="hidden" name="txtServidorID" value="<?=@$obj->servidor_id;?>" />
                <input type="hidden" name="txtPencionistaID" value="<?=@$obj->pensionista_id;?>" />

                <dl class="add_pensionista">
                    <dt>
                        <label>Pensionista</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtNome" id="txtNome" class="texto10" value="<?= @$obj->pensionistanome; ?>" />
                    </dd>
                    <dt>
                        <label>CPF</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtCPF" class="texto03" alt="cpf" value="<?= @$obj->cpf; ?>"/>
                    </dd>
                    <dt>
                        <label>Banco</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtBanco" id="txtBanco" class="texto01" value="<?= @$obj->banco; ?>"/>
                    </dd>
                    <dt>
                        <label>Ag&ecirc;ncia/DV</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtAgencia" id="txtAgencia"  class="texto02" value="<?= @$obj->agencia; ?>"/> /
                        <input type="text" name="txtAgenciaDV" id="txtAgenciaDV"  class="texto01" value="<?= @$obj->agencia_dv; ?>"/>
                    </dd>
                    <dt>
                        <label class="dt_longo">Conta Corrente/DV</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtConta" id="txtConta" class="texto02" value="<?= @$obj->conta; ?>"/> /
                        <input type="text" name="txtContaDV" id="txtContaDV" class="texto01" value="<?= @$obj->conta_dv; ?>"/>
                    </dd>
                    <dt>
                        <label>Percentual</label>
                    </dt>
                    <dd>
                        <input type="text" name="txtPercentual" id="txtPercentual" alt="decimal" class="texto01" value="<?= @$obj->percentual; ?>"/>
                    </dd>
                </dl>
                <hr/>
                <button type="submit" name="btnEnviar">Enviar</button>
                <button type="reset" name="btnLimpar">Limpar</button>
            </form>
        </div><!-- Fim do formulário pensionistas -->
    </div>

</div> <!-- Final da DIV content -->
<link rel="stylesheet" href="<?= base_url()?>css/jquery-ui-1.8.5.custom.css">
<script type="text/javascript" src="<?= base_url()?>js/jquery.validate.js"></script>
<script type="text/javascript" src="<?= base_url()?>js/jquery-verificaCPF.js"></script>
<script type="text/javascript">

    $(function() {
        $( "#servidor" ).accordion();
        $( "#accordion" ).accordion();
    });

    $(document).ready(function(){
        jQuery('#form_pensionista').validate( {
            rules: {
                txtNome: {
                    required: true,
                    minlength: 10
                },
                txtCPF: {
                    required: true,
                    verificaCPF: true
                },
                txtBanco: {
                    required: true,
                    minlength: 2,
                    maxLength: 5
                },
                txtAgencia: {
                    required: true,
                    minlength: 2,
                    maxLength: 5
                },
                txtPercentual:
                    {
                    required: true,
                    minlength: 1,
                    max: 100
                },
                txtConta: {
                    required: true,
                    minlength: 2
                }
            },
            messages: {
                txtNome: {
                    required: "*",
                    minlength: "!"
                },
                txtCPF: {
                    required: "*",
                    verificaCPF: "CPF inválido"
                },
                txtBanco: {
                    required: "*",
                    minlength: "!",
                    maxLength: "!"
                },
                txtPercentual:
                    {
                    required: "*",
                    minlength: "!",
                    max: "Por favor, indique um valor inferior ou igual a 100."

                },
                txtAgencia: {
                    required: "*",
                    minlength: "!",
                    maxLength: "!"
                },
                txtConta: {
                    required: "*",
                    minlength: "!"
                }
            }
        });
    });

</script>